package com.example.demo_feign;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/feign")
public class IndexController {

    @Autowired
    IFeignService ifeign ;

    @RequestMapping("/hi")
    public String hi(@RequestParam(name="name") String name){
        return "message: "+ifeign.sayHi(name);
    }

    @RequestMapping("/hello")
    public String hello(@RequestParam(name="name") String name){
        return "message: "+ifeign.sayHello(name);
    }
}
